<?php

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;

/* @var $this yii\web\View */
/* @var $model backend\models\GeneralocrSearch */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="yue-juan-search">

    <?php $form = ActiveForm::begin([
        'action' => ['/yue-juan/scan-view'],
        'method' => 'get',
        'options' => [
            'data-pjax' => 1
        ],
        'layout' => 'inline',
    ]); ?>

    <?= $form->field($model, 'title')->hiddenInput()->label(false) ?>
    <?= $form->field($model, 'ocr_string')->textInput(['placeholder' => '关键词', 'value' => $ocr_string]) ?>

    <div class="form-group">
        <?= Html::submitButton('搜索', ['class' => 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

    <div class="text-info">
        <span class="h4"><br>
        <?php
        $get = Yii::$app->request->get();
        $ocr_string = $get['GeneralocrSearch']['ocr_string'];
        if ($ocr_string) {
            if (is_array($arr_win_result) && count($arr_win_result) > 0) {
//                    echo count($arr_win_result)."条搜索结果，分别位于第<span class='text-danger h3'>" . implode(',', $arr_win_result) . "</span>页";
                echo count($arr_win_result) . "条搜索结果，分别位于以下<span style='color:red'>标红</span>的页面中";
            } else {
                echo "无搜索结果";
            }
        } else {
            echo "共" . $dataProvider->count . '页案卷';
        }
        ?>
        </span>
    </div>

</div>
